package cn.sdormitory.basedata.entity;

import cn.hutool.core.date.DatePattern;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author: lx
 * @date: 2023/8/3 17:00
 * @description:
 */
@Data
@TableName("b_device")
public class BDevice implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 序列号
     */
    private String serialNo;

    /**
     * 品牌
     */
    private String brand;

    /**
     * 设备位置
     */
    private String deviceAddr;

    /**
     * 位置类型 1-宿舍 2-教学楼
     */
    private String addrType;

    /**
     * 设备ip
     */
    private String deviceIp;

    /**
     * 状态 1-已绑定 2-未绑定
     */
    private String status;

    /**
     * 创建时间
     */
    @ExcelIgnore
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date createTime;

    private String createBy;

    /**
     * 修改时间
     */
    @ExcelIgnore
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date modifyTime;

    private String modifyBy;

    @TableField(exist = false)
    private Integer pageNum;
    @TableField(exist = false)
    private Integer pageSize;
    @TableField(exist = false)
    private String addrName;
}
